module leveldb.comparer;

import leveldb.options;



/// 64位无符号整数比较器
class ComparatorUlong : Options.Comparator
{
	override int compare(const char[] a, const char[] b) inout
	{
		ulong al = *cast(const ulong*)a;
		ulong bl = *cast(const ulong*)b;
		return cast(int)(al - bl);
	}

	override string name() inout
	{
		return "Ulong Compare";
	}
}
